<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css属性_盒子模型</title>
    <style>
        div{
            border: 1px red solid;
        }
        .div1{
            width: 200px;
            height: 200px;
            margin: 0 auto;
            /* 外边距   */
            padding: 50px;
            /*  设置盒子的属性,让 width 和 height 就是盒子最终的大小  */
            box-sizing: border-box;
        }
        .div2{
            width: 100px;
            height: 100px;
            /*  内边距  */
            /*margin: 50px;*/
        }
    </style>
</head>
<body>

    <div class="div1">
        <div class="div2"></div>
    </div>

</body>
</html>